#pragma once

#define TIMER_IN	1
#define TIMER_OUT	2
#define TIMER_HOVER 3

class CDlgMsg : public CDialogImpl<CDlgMsg>
			//, public CUpdateUI<CDlgMsg>, public CCustomDraw<CDlgMsg>
{
public:
	enum { IDD = IDD_DLG_MSG };

// 	BEGIN_UPDATE_UI_MAP(CDlgMsg)
// 		UPDATE_ELEMENT(IDC_BUTTON1, UPDUI_CHILDWINDOW)
// 	END_UPDATE_UI_MAP()

	BEGIN_MSG_MAP(CDlgMsg)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		MESSAGE_HANDLER(WM_PAINT, OnPaint)
		MESSAGE_HANDLER(WM_TIMER, OnTimer)
		COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
		COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
		MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd)
//		CHAIN_MSG_MAP(CCustomDraw<CDlgMsg>)
	END_MSG_MAP()

	// Handler prototypes (uncomment arguments if needed):
	//	LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
	//	LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
	//	LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)

	LRESULT OnPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnTimer(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnEraseBkgnd(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);

	void ShowMessage(CString strText, CString strCaption = "");

public:
	int m_nTimeInSpeed;
	int m_nTimeOutSpeed;
	int m_nTimeIn;
	int m_nTimeOut;
	int m_nHoverTime;
	int m_nHoverStop;
	int m_nEventing;

	CString m_strCaption;
	CString m_strText;
	CFont   m_fontCaption;
	CFont   m_fontText;
	COLORREF m_crCaption;
	COLORREF m_crText;
};
